1. Field of the Invention
The present invention relates generally to computerized methods for accessing databases, and in particular, to an object-oriented method programming model for accessing both hierarchical and relational databases from an objects framework.
2. Description of Related Art
It is well known in the art to use database management systems, such as IBM""s IMS(trademark) (Information Management System) and DB2(trademark) (DataBase 2) database management systems, to manage computerzed databases. Indeed, both IMS(trademark) and DB2(trademark) have been used for decades and remain in use today. Currently, there is a need to access such xe2x80x9clegacyxe2x80x9d databases using application programs developed by object-oriented programming systems (OOPS). However, there are few tools available to assist OOPS developers.
One method for allowing object-oriented application programs to access data in an IMS(trademark) or DB2(trademark) database is through transaction wrappering. Transaction wrappering creates a class having member functions or methods that retrieve data from the database, create an object embodying the retrieved data, and manipulate the object in an object-oriented application program. The problem with this approach is that each object-oriented application requires substantial additional coding, both object-oriented and non-object-oriented, before it is able to access the data in the database.
Another approach to accessing data in a non-relational, non-object-oriented database is to translate the non-relational database to a relational database, and use existing object-oriented programming techniques developed for relational databases to access the data therein. The problem with this approach is that non-relational data, such as found in hierarchical databases, does not map well to a relational database.
Thus, there is a need in the art for improved techniques for accessing hierarchical and relational databases using object-oriented frameworks.
To overcome the limitations in the prior art described above, and to overcome other limitations that will become apparent upon reading and understanding the present specification, the present invention discloses a method, apparatus, and article of manufacture for accessing a database. A hierarchical database system is modeled into an objects framework, wherein the objects framework corresponds to one or more application views, database definitions, and data defined and stored in the hierarchical database system. The objects framework also provides mechanisms for accessing a relational database system, wherein the objects framework provides industry-standard interfaces for attachment to the relational database system. Transactions from an application program for both the hierarchical database system and the relational database system are processed through the objects framework using message queue objects.
Various advantages and features of novelty, which characterize the invention, are pointed out with particularity in the claims annexed hereto and form a part hereof. However, for a better understanding of the invention, its advantages, and the objects obtained by its use, reference should be made to the drawings which form a further part hereof, and to accompanying descriptive matter, in which there is illustrated and described specific examples of an apparatus m accordance with the invention.